// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */
// 算法配置管理
import Algorithm from '@/views/algorithm/Algorithm';

import ModelTest from '@/views/algorithm/ModelTest';


// 模型管理
import models from '@/views/models/Model';
// 模型编辑
import modelEdit from '@/views/models/edit';
// 数据集管理
import datasets from '@/views/datasets/Dataset';

import tags from '@/views/models/Tag';


import fapiao from '@/views/fapiao/Fapiao';
import fapiaoedit from '@/views/fapiao/edit';



// 启用路由
Vue.use(Router);

// 导出路由
export default new Router({
    routes: [{
        path: '/',
        name: '',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    },

    {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }

    , {
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [
        {
            path: '/algorithm/Algorithm',
            name: '算法配置管理',
            component: Algorithm,
            meta: {
                requireAuth: true
            },
        },

        {
            path: '/algorithm/ModelTest',
            name: 'ModelTest',
            component: ModelTest,
            meta: {
                requireAuth: true
            },
        },

        {
            path: '/models/Model',
            name: '模型管理',
            component: models,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/models/modelEdit',
            name: '模型详情',
            component: modelEdit,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/models/Tag',
            name: '模型标签管理',
            component: tags,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/datasets/Dataset',
            name: '数据集管理',
            component: datasets,
            meta: {
                requireAuth: true
            }
        },
          {
            path: '/fapiao/Fapiao',
            name: 'fapiao',
            component: fapiao,
            meta: {
              requireAuth: true
            }
          },
          {
            path: '/fapiao/edit',
            name: 'fapiaoedit',
            component: fapiaoedit,
            meta: {
              requireAuth: true
            }
          },
    ]
    }]
})
